﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BLLLaguzziCandidato
{
    public class BLLGenerico
    {
        private LaguzziDataContext _context;

        public LaguzziDataContext Context 
        {
            get
            {
                if (_context == null)
                    _context = new LaguzziDataContext();

                return _context;
            }
            set { _context = value; }
        }

        public BLLGenerico(LaguzziDataContext context)
        {
            Context = context;
        }

        public BLLGenerico() : this(new LaguzziDataContext()) { }

        public void GuardarCambios()
        {
            Context.SubmitChanges();
        }
    }
}
